package org.NooLab.glue.instances;

import java.io.Serializable;





public class InstanceFlavor implements Serializable{

	private static final long serialVersionUID = 647089566743980242L;

	public static int LR_AR_NF = 1;
	public static int LR_AR_WF = 2;
	public static int LR_DR_NF = 3;
	public static int LR_DR_WF = 4;
	public static int LR_GR_NF = 5;
	public static int LR_GR_WF = 6;
	
	String name="" ;
	
	/** 
	 * this could be anything, the only requirement is that there is at least
	 * one+ SOURCE and one+ RECEPTOR
	 */
	String contentType = "*" ;
	
	/** 0=participants are polling for new messages, >0 = time period in seconds for polling  */
	double connectionDelay = 0.0; 
	
	boolean instanceIsUnique = false ;
	/**
	 * 1 = arbitrary RECEPTORS, no feedback to SOURCE
	 * 2 = arbitrary RECEPTORS, with feedback to SOURCE
	 * 3 = dedicated RECEPTOR, no feedback to SOURCE, needs relationItemID >= 0
	 * 4 = dedicated RECEPTOR, with feedback to SOURCE
	 * 5 = arbitrary within group of RECEPTOR, no feedback, needs relationGroupID >= 0 
	 * 6 = arbitrary within group of RECEPTOR, with feedback 
	 * 
	 * default value 1 = the most simple connection, SOURCEs will not install receipt receptors, and will 
	 * send to any matching receptor; 	 
	 */
	int linkRelation=1; 
	 
	/** unique ID for dedicated interaction; 
	 * note, that the SOURCE always should retrieve these IDs from the MessageBoardFactory  */
	
	int relationItemID = -1 ; 
	int relationGroupID = -1 ;
	
	
	public InstanceFlavor(){
		
	}


	// ------------------------------------------------------------------------
	
	public String getName() {
		return name;
	}


	public void setName(String name) {
		this.name = name;
	}


	public String getContentType() {
		return contentType;
	}


	public void setContentType(String contentType) {
		this.contentType = contentType;
	}

 


 

	public double getConnectionDelay() {
		return connectionDelay;
	}


	public void setConnectionDelay(double connectionDelay) {
		this.connectionDelay = connectionDelay;
	}


	public boolean isInstanceIsUnique() {
		return instanceIsUnique;
	}
	public boolean getInstanceIsUnique() {
		return instanceIsUnique;
	}

	public void setInstanceIsUnique(boolean instanceIsUnique) {
		this.instanceIsUnique = instanceIsUnique;
	}


	public int getRelationItemID() {
		return relationItemID;
	}


	public void setRelationItemID(int relationItemID) {
		this.relationItemID = relationItemID;
	}


	public int getRelationGroupID() {
		return relationGroupID;
	}


	public void setRelationGroupID(int relationGroupID) {
		this.relationGroupID = relationGroupID;
	}


	public int getLinkRelation() {
		return linkRelation;
	}


	public void setLinkRelation(int linkRelation) {
		this.linkRelation = linkRelation;
	}
	
	
	
}
